package com.fastshopping.model.service.impl;

import com.fastshopping.model.dao.ModelMapper;
import com.fastshopping.model.service.ModelService;
import com.fastshopping.order.pojo.Model;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Name: 李袁勇
 * @Date: 2020/6/5 9:47
 * @Version: 1.0
 **/

@Service
public class ModelServiceImpl implements ModelService {

    @Autowired
    private ModelMapper modelMapper;

    @Override
    public List<Model> findMyModel(int user_id) {
        return modelMapper.findMyModel(user_id);
    }

    @Override
    public List <Model> findBuyModel(int user_id) {
        return modelMapper.findBuyModel(user_id);
    }

    @Override
    public List <Map> findAllCategory() {
        return modelMapper.findAllCategory();
    }

    @Override
    public List <Model> findOneCategory(int user_id, String category) {
        return modelMapper.findOneCategory(user_id,category);
    }

    @Override
    public List <Model> findTbName(int user_id, String tb_name) {
        return modelMapper.findTbName(user_id,tb_name);
    }

    @Override
    public List <Map> findBuyCategory() {
        return modelMapper.findBuyCategory();
    }

    @Override
    public List <Map> findCategoryByBuy(int user_id, String category) {
        return modelMapper.findCategoryByBuy(user_id,category);
    }

    @Override
    public List <Model> findAllBuy(int user_id, String sub_category) {
        return modelMapper.findAllBuy(user_id,sub_category);
    }
}
